<?php
// +----------------------------------------------------------------------
// | 幕小铺
// +----------------------------------------------------------------------
// | 版权所有 2016~2020 幕小铺科技（大连）有限公司
// +----------------------------------------------------------------------
// | 2020/03/14
// +----------------------------------------------------------------------

namespace app\user_center\validate\member;

use think\Validate;

/**
 * 申请供应商 验证器
 * @package app\admin\validate
 * @author jason wang <120907037@qq.com>
 */
class Supplier extends Validate
{
    protected $rule = [
        'user_id' 			=> 'number|require', 	 //user_id 数字/必填/大于0
		'username' 			=> 'require',
		'mobile' 			=> 'require',
		'corporate_name' 	=> 'require',
		'brand' 			=> 'require',
		'supplier_type' 	=> 'require',
		'city' 				=> 'require',
		'class_temp' 		=> 'require',
    ];

    protected $message  =   [
        'user_id' 			=> 'user_id格式错误',
		'username' 			=> 'username格式错误',
		'mobile' 			=> 'mobile格式错误',
		'corporate_name' 	=> 'corporate_name格式错误',
		'brand' 			=> 'brand格式错误',
		'supplier_type' 	=> 'supplier_type格式错误',
		'city' 				=> 'city格式错误',
		'class_temp' 		=> 'class_temp格式错误',
    ];

    //验证场景
    protected $scene = [
							'apply_team_leader' =>  [
								'user_id', 		
								'username', 		
								'mobile', 		
								'corporate_name',
								'brand', 		
								'supplier_type', 
								'city',			
								'apply_supplier', 	
							],
               			];
}
